<script setup lang="ts">
import { ref } from 'vue'

const list = ref(['西瓜', '苹果', '鸭梨', '榴莲'])
const person = {
  name: '张三',
  age: 18,
  gender: '男'
}
</script>


<template>
  <div id="app">
    <h3>小黑水果店</h3>
    <ul>
      <li v-for="(item, index) in list" :key="index">{{ item }} - {{ index }}</li>
    </ul>

    <ul>
      <li v-for="item in list" :key="item">
        {{ item }}
      </li>
    </ul>
    <ul>
      <li v-for="(value, key, index) in person" :key="index">键{{ key }}值{{ value }}</li>
    </ul>
  </div>
</template>

<style></style>